package com.dream.tihai.common.error;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author Valley
 * Created by Valley on 2022/11/9
 */
@RestControllerAdvice
public class MyExHandler {

    @ExceptionHandler(NullPointerException.class)
    public R nullException() {
        return R.fail("空指针");
    }



}
